home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Borland Plateform / Turbo Prolog 2 / TEST < prev    next >
Encoding:
Text File  |  1979-12-31  |  5.0 KB  |  167 lines

  1.                   Institutσ Oµ Compute≥ Science
  2.                             BCC╔ FAST
  3.                              Karachi
  4.  
  5. Coursσ Namσ ║ File≤ AnΣ Database≤             Datσ ║ 16-04-1990
  6. Coursσ Codσ ║ 2302
  7. Instructo≥  ║ Professo≥ JaveΣ Ashraµ           
  8. MiΣ Terφ Tes⌠                                 Ma° Mark≤ ║ 100
  9. ----------------------------------------------------------------
  10.  
  11. Notσ ║ Questioε numbe≥ onσ i≤ fo≥ Oraclσ student≤ onl∙.
  12.        Questioε numbe≥ four i≤ fo≥ Ingres≤ student≤ only.
  13.  
  14.  
  15. Q.1. Fil∞ iε thσ blank≤ :¡                         Mark≤ 20
  16.  
  17. 1.   Iε ORACL┼ databasσ informatioε i≤ organiseΣ iε _________.
  18. 2.   Table≤ arσ madσ u≡ oµ _______▀ anΣ ________.
  19. 3.   StandarΣ datσ forma⌠ iε ORACL┼ i≤ ______________.
  20. 4«   ┴ ________▀ functioε caε no⌠ bσ useΣ alongwitΦ aε áindividua∞ ì
  21.      µunction.
  22. 5« á  ________▀ clausσ i≤ useΣ t∩ displa∙ resul⌠ iε ß áparticula≥ ì
  23.      o≥der. 
  24. 6« á  ┴ trigge≥ i≤ ß se⌠ oµ ________▀ o≥ _______▀ ácommand≤ átha⌠ ì
  25.      arσ executeΣ b∙ ß certaiε event.
  26. 7.   ________▀ leve∞ trigger≤ caε bσ defineΣ oε al∞ threσ levels.
  27. 8.   Al∞ _______ field≤ corresponΣ t∩ basσ tablσ iε ß block.
  28. 9.   Therσ mus⌠ bσ atleas⌠ onσ _________▀ fielΣ iε ß block.
  29. 10.  ___________▀ field≤ arσ placeΣ oε pagσ zero.
  30. 11.  Hel≡ messagσ fo≥ ß fielΣ i≤ writteε iε ______▀ window.
  31. 12.  _______▀ trigger≤ arσ no⌠ triggereΣ b∙ ß specifiπ event.
  32. 13« á┴ ápost_inser⌠ átrigge≥ defineΣ a⌠ á____▀ áleve∞ áoverride≤ ì
  33.      post_Θnser⌠ trigge≥ defineΣ a⌠ thσ _______▀ level.
  34. 14« á┴ __________▀ trigge≥ i≤ executeΣ wheε thσ curso≥ i≤ áabou⌠ ì
  35.      t∩ leavσ ß fielΣ whosσ valuσ ha≤ beeε changed.
  36. 15.  _______▀ trigge≥ i≤ executeΣ oncσ pe≥ query.
  37. 16« á┴ á_______▀ átrigge≥ ái≤ áexecuteΣ áoncσ áfo≥ áeacΦ árecorΣ ì
  38.      retrieveΣ b∙ thσ query.
  39. 17.  Onl∙ selec⌠ statement≤ arσ alloweΣ iε ß _______▀ trigger.
  40. 18.  Explaiε followinτ attriute≤ oµ trigger≤ :-
  41. a)   Abor⌠ trigge≥ wheε ste≡ fails
  42. b)   Reversσ returε code
  43. c)   Returε succes≤ wheε abortinτ trigger
  44. .pa
  45. è    
  46.  
  47.  
  48.  
  49.  
  50. Q.2. Writσ SQ╠ statement≤ fo≥ followinτ :¡             Mark≤ ║ 10
  51.  
  52. 1.   Makσ ß tablσ EM╨ witΦ followinτ column≤ :
  53.      Column         Type      Width
  54.      ------         ----      -----
  55.      EMPNO          string      4
  56.      ENAME          strinτ     10
  57.      JOB            strinτ     10
  58.      MGR            strinτ      4
  59.      HIREDATE       date        -
  60.      SAL            numeric     5
  61.  
  62. 2« á Selec⌠ al∞ column≤ froφ abovσ tablσ wherσ salar∙ ái≤ áabovσ ì
  63.      120░ anΣ belo≈ 1300.
  64.  
  65. 3« á Lis⌠ áinformatioε abou⌠ al∞ thσ managers¼ a≤ áwel∞ áa≤ áthσ ì
  66.      clerk≤ iε departmen⌠ 10.
  67.  
  68. 4.   WhicΦ employee≤ worδ iε Smith'≤ department?
  69.  
  70. 5«   WhicΦ employee≤ havσ thσ samσ joΓ a≤ Clarδ o≥ havσ ß ásalar∙ ì
  71.      greate≥ thaε hi≤ ?
  72.  
  73.  
  74. .pa
  75. è
  76.  
  77.  
  78.  
  79. Q.3. ┴ databasσ consist≤ oµ followinτ table≤ :-
  80.      Table▒ á(SCODE,MCODE⌐ ¡ Relatioε betweeε supplier≤ áanΣ ára≈ ì
  81.                              materials.
  82.      Table▓ (MCODE,MNAME⌐  ¡ Maste≥ tablσ fo≥ ra≈ materials.
  83.      
  84.      Table│ (SCODE,SNAM┼⌐  ¡ Maste≥ tablσ fo≥ suppliers.
  85.  
  86. Wherσ 
  87.       SCOD┼ i≤ supplie≥ code
  88.       
  89.       MCOD┼ i≤ ra≈ material
  90.       
  91.       MNAM┼ i≤ namσ oµ ra≈ material
  92.  
  93.   
  94. and   SNAM┼ i≤ supplier≤ name.
  95.  
  96. ¡  Onσ supplie≥ caε suppl∙ morσ thaε onσ ra≈ material.
  97.  
  98. ¡  Onσ ra≈ materia∞ caε bσ supplieΣ b∙ morσ thaε onσ suppliers.
  99.      
  100.  
  101.  
  102.  
  103.  
  104.                                                    Mark≤  20
  105.  
  106. (ß ⌐ Writσ áaε  applicatioε fo≥ ne≈ supplie≥ entr∙ áwitΦ áfollowinτ ì
  107.      constraints:ì
  108.   
  109.    ¡ SCOD┼ t∩ bσ incrementeΣ b∙ thσ systeφ iε sequentia∞ order.
  110.  
  111.    ¡ áAfte≥ enterinτ SNAM┼ use≥ shoulΣ havσ ß choicσ t∩ ente≥ áa≤ ì
  112.       mßn∙ ra≈ material code≤ a≤ required.
  113.  
  114.    ¡ Therσ mus⌠ bσ ß checδ whethe≥ ra≈ materia∞ exist≤ o≥ not.
  115.  
  116.    ¡ áIµ exist≤ theε displa∙ materia∞ namσ elsσ ádispla∙ áanothe≥ ì
  117.       meεu fo≥ entr∙ oµ materia∞ namσ.
  118.   
  119.    ¡ checδ fo≥ duplicatioε iε al∞ tables.
  120.  
  121.                                                      Mark≤ 20
  122. (B)« Writσ a prograφ iε whicΦ ║   
  123.  
  124.     ¡ Wheε yo⌡ ente≥ ß supplie≥ code¼ prograφ shoulΣ displa∙ áal∞ ì
  125.       ra≈ materia∞ name≤ whicΦ caε bσ supplieΣ b∙ ß supplier.
  126.  
  127.     ¡ Wheε yo⌡ ente≥ ß ra≈ materia∞ code¼ prograφ shoulΣ ádispla∙ ì
  128.       name≤ oµ al∞ supplie≥ wh∩ caε suppl∙ tha⌠ ra≈ material.
  129.  
  130. è
  131.  
  132.  
  133.  
  134.                                                       Mark≤ 30
  135. (C)«  Writσ ß prograφ t∩ creatσ repor⌠ witΦ followinτ forma⌠ :
  136.  
  137.  
  138.                       ╪ ┘ ┌ COMPANY
  139.                      ===============
  140.                      
  141.                      Lis⌠ oµ Suppliers   
  142.                      -----------------
  143.  
  144.  
  145.    Supplie≥ Namσ ║ Mr ╪┘Z
  146.  
  147.    Ra≈ material≤ :
  148.    -------------
  149.    1« AB├                        2« XYZ
  150.   
  151.    3« ABY
  152.  
  153.   
  154.    Supplie≥ Namσ ║ ............
  155.    .
  156.    .
  157.    .
  158.  
  159.  
  160.                        
  161.  
  162.  
  163.  
  164.  
  165.  
  166. Q.4« áWritσ áß áprograφ áhavinτ followinτ facilitie≤ :-
  167.       ¡ Systeφ shoulΣ promp⌠ fo≥ ß materia∞ codσ t∩ bσ deleteΣ aεd 
  168.         wheε áß ácodσ i≤ entered¼ i⌠ shoulΣ ádeletσ áal∞ árecord≤ ì
  169.         contßininτ thi≤ codσ froφ table▒ anΣ tablσ▓.
  170. .pa
  171. è